class P10633 {

	public static void main(String[] args) {
		String line = readLn();
		while (!"0".equals(line)) {
			process(new Long(line).longValue());
			line = readLn();
		}
	}
	private static void process(long i) {
		long obvious = i/9*10;
		String result = "";
		for (long j=obvious-10; j<=obvious+10; j++) {
			if(j-(j/10)==i){
				result += j+" ";
			}
		}
		System.out.println(result.trim());
	}
	static String readLn() {
		String newLine = System.getProperty("line.separator");
		StringBuffer buffer = new StringBuffer();
		int car = -1;
		try {
			car = System.in.read();
			while ((car > 0) && (car != newLine.charAt(0))) {
				buffer.append((char) car);
				car = System.in.read();
			}
			if (car == newLine.charAt(0))
				System.in.skip(newLine.length() - 1);
		} catch (java.io.IOException e) {
			return (null);
		}
		if ((car < 0) && (buffer.length() == 0))
			return (null);
		return (buffer.toString()).trim();
	}

}